<?php 
namespace Home\Model;
use Think\Model;
class QuestionModel extends Model {

	public function getHotTen()
	{

		
		$time = strtotime("-7 days");

		$ques = M('question')->field('title,qid,answer_num')->where(['ctime'=>['gt',$time]])->order("answer_num desc")->limit(10)->select();

		// $sql = "select title,qid,answer_num from question where ctime>'{$time}' order by answer_num desc limit 10";
    	return $ques;
	}
}


 ?>